package com.tianbao54.thrift;

import com.tianbao54.thrift.model.DataException;
import com.tianbao54.thrift.model.Person;
import com.tianbao54.thrift.model.PersonService;
import org.apache.thrift.TException;

public class ThriftServiceImpl implements PersonService.Iface {

    @Override
    public Person getPersonByPersonName(String name) throws DataException, TException {

        System.out.println("client: " + name);
        Person person = new Person();
        person.setName(name).setAge(12).setMarried(false);

        return person;
    }

    @Override
    public void savePerson(Person person) throws DataException, TException {
        System.out.println("client: " + person);
    }
}